//
// Created by liuwenwen on 12/17/2019.
//

//对文件的读取示例
#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
int main ()
{
    char buffer[256];       //定义一个数组，用来存放字符
    ifstream exampleFile("./../ToBeTran.txt");       //声明一个对象与要读的文件联系
    if (! exampleFile.is_open())        // 判断文件是否打开失败
    {
        cout << "Error opening file"; exit (1);
    }
    while (!exampleFile.eof())
    {
        exampleFile.getline(buffer,100000);
        cout << buffer << endl;
    }
    return 0;
}